/*
 * @Description: 
 * @Author: fhw
 * @Date: 2022-12-05 15:05:02
 */
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
import { IsDefined, IsNotEmpty } from "class-validator";
import { PageDto } from "src/common/dto/dto";

export class GetUserPageDto extends PageDto {

    @ApiPropertyOptional({
        type: String,
        name: 'id',
        description: '用户id',
    })
    public readonly id: string

}

export class CreateleaveAMessageDto {
    @IsDefined({ message: '用户ID不能为空' })
    @IsNotEmpty({ message: '用户ID不能为空' })
    @ApiProperty({
        type: Number,
        name: 'userId',
        description: '用户ID',
    })
    public readonly userId: number

    @IsDefined({ message: '留言内容不能为空' })
    @IsNotEmpty({ message: '留言内容不能为空' })
    @ApiProperty({
        type: String,
        name: 'content',
        description: '留言内容',
    })
    public readonly content: string

    @ApiPropertyOptional({
        type: Number,
        name: 'toUserId',
        description: '被回复用户id',
    })
    public toUserId?: number

    @ApiPropertyOptional({
        type: Number,
        name: 'messageBoardId',
        description: '留言ID',
    })
    public messageBoardId?: number
}